package com.zhiyou100.servicrImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.mapper.dispensing.DispensMapper;
import com.zhiyou100.model.Dispensing;
import com.zhiyou100.service.DispensService;
@Service
public class DispensServiceImpl implements DispensService{
	@Autowired
	private DispensMapper mapper;
	
	@Override
	public List<Dispensing> findAll(Map<String, Object> map) {
		System.out.println("发药模块进入服务层");
		List<Dispensing> dispensing = mapper.findAll(map);
		return dispensing;
	}
	// 详情
	@Override
	public List<Dispensing> findById(int medical_record) {
		List<Dispensing> dis = mapper.findById(medical_record);
		return dis;
	}
	// 详情页面内发药
	@Override
	public void updateSendOne(Map<String, Object> map) {
		System.out.println("详情页面内发药发药数量: "+map);
		mapper.updateSendOne(map);
	}
	@Override
	public void updateSendFive(Map<String, Object> map) {
		System.out.println("详情页面内发药发药数量: "+map);
		mapper.updateSendFive(map);
	}
	@Override
	public void updateSendThirty(Map<String, Object> map) {
		System.out.println("详情页面内发药发药数量: "+map);
		mapper.updateSendThirty(map);
	}
	@Override
	public void updateSendAll(Map<String, Object> map) {
		System.out.println("详情页面内发药发药数量: "+map);
		mapper.updateSendAll(map);
	}
	// 发药
	@Override
	public Dispensing findToAdd(int medical_record) {
		Dispensing dis = mapper.findToAdd(medical_record);
		return dis;
	}
	@Override
	public void addDispensing(Dispensing dis) {
		mapper.addDispensing(dis);
		
	}

}
